package com.hykc.auth.common.enums;

import lombok.Getter;

@Getter
public enum ExceptionEnum {
    APPLICATION_NOT_FOUND(404, "应用不存在！"),
    CARTS_NOT_FOUND(404, "购物车不存在！"),
    DATA_TRANSFER_ERROR(500, "数据转换异常！"),
    DELETE_FAIL_CATEGORY_HAS_GOODS(400, "分类下包含商品，不能删除"),
    DELETE_FAIL_CATEGORY_IS_PARENT(400, "分类包含子分类，不能删除"),
    DELETE_OPERATION_FAIL(500, "删除操作失败！"),
    DIRECTORY_WRITER_ERROR(500, "目录写入失败！"),
    FILE_UPLOAD_ERROR(500, "文件上传失败！"),
    FILE_WRITER_ERROR(500, "文件写入失败！"),
    INSERT_OPERATION_FAIL(500, "新增操作失败！"),
    INVALID_FILE_TYPE(400, "无效的文件类型！"),

    INVALID_NOTIFY_PARAM(400, "回调参数有误！"),
    INVALID_NOTIFY_SIGN(400, "回调签名有误！"),
    INVALID_ORDER_STATUS(500, "订单状态不正确！"),
    INVALID_PARAM_ERROR(400, "无效的请求参数！"),
    INVALID_PHONE_NUMBER(400, "无效的手机号码"),
    INVALID_SERVER_ID_SECRET(400, "无效的服务id和密钥！"),
    INVALID_USERNAME_PASSWORD(400, "无效的用户名和密码！"),

    INVALID_VERIFY_CODE(400, "验证码错误！"),
    INVALID_VERIFY_CODE_SERVER(500, "验证码验证失败！"),
    ITEM_NOT_FOUND(404, "商品不存在"),
    LESSON_DETAIL_NOT_FOUND(404, "课程详情不存在！"),
    LESSON_NOT_FOUND(404, "课程不存在！"),
    ORDER_DETAIL_NOT_FOUND(404, "订单数据不存在！"),
    ORDER_NOT_FOUND(404, "订单不存在！"),
    PRICE_CANNOT_BE_NULL(400, "价格不能为空")//枚举项 写在最前边
    ,
    SECKILL_ALREADY_JOIN_ERROR(400, "当前参与用户过多，请求稍后重试！"),

    SECKILL_END_ERROR(400, "抢购已结束！"),
    SECKILL_NOT_FOUND(404, "秒杀信息不存在！"),
    SEND_MESSAGE_ERROR(500, "短信发送失败！"),
    STOCK_NOT_ENOUGH_ERROR(500, "商品库存不足！"),
    UNAUTHORIZED(401, "登录失效或未登录！"),
    FORBIDDEN(403, "权限不足！"),
    UPDATE_OPERATION_FAIL(500, "更新操作失败！"),
    USER_ADDRESS_NOT_FOUND(404, "用户地址不存在！"),
    USER_NOT_FOUND(404, "用户不存在"),

    CATEGORY_NOT_FOUND (404,"分类不存在") ;
    //成员变量
    private int status;

    private String message;
    //构造函数

    ExceptionEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }
}

